﻿namespace Sunny.Service
{
    /// <summary>
    /// Redis的key前缀
    /// </summary>
    public class AbstractRedisKeyPrefix
    {
        /// <summary>
        /// Redis的key
        /// </summary>
        public string KeyPrefix { get; set; }
        /// <summary>
        /// 过期时间（秒）
        /// </summary>
        public int Expire { get; set; }

        public AbstractRedisKeyPrefix(string key)
        {
            Expire=0;
            KeyPrefix = key;
        }

        public AbstractRedisKeyPrefix(string keyPrefix, int expire)
        {
            KeyPrefix = keyPrefix;
            Expire = expire;
        }
    }
}